using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace Forging2.DataBase.ZH_IMES
{
    public partial class ZH_IMESDbContext : DbContext
    {
        public ZH_IMESDbContext()
            : base("name=ZH_IMESDbContext")
        {
        }

        public virtual DbSet<ly_buttom> ly_buttom { get; set; }
        public virtual DbSet<ly_employee> ly_employee { get; set; }
        public virtual DbSet<ly_item> ly_item { get; set; }
        public virtual DbSet<ly_item_bom> ly_item_bom { get; set; }
        public virtual DbSet<ly_item_bom_relation> ly_item_bom_relation { get; set; }
        public virtual DbSet<ly_log> ly_log { get; set; }
        public virtual DbSet<ly_nc_code> ly_nc_code { get; set; }
        public virtual DbSet<ly_nc_code_group> ly_nc_code_group { get; set; }
        public virtual DbSet<ly_nc_code_relation> ly_nc_code_relation { get; set; }
        public virtual DbSet<ly_nc_repair> ly_nc_repair { get; set; }
        public virtual DbSet<ly_operation> ly_operation { get; set; }
        public virtual DbSet<ly_operation_pod> ly_operation_pod { get; set; }
        public virtual DbSet<ly_operation_resource> ly_operation_resource { get; set; }
        public virtual DbSet<ly_pod_button> ly_pod_button { get; set; }
        public virtual DbSet<ly_pod_function> ly_pod_function { get; set; }
        public virtual DbSet<ly_process_route> ly_process_route { get; set; }
        public virtual DbSet<ly_res_role> ly_res_role { get; set; }
        public virtual DbSet<ly_resource_type> ly_resource_type { get; set; }
        public virtual DbSet<ly_resources> ly_resources { get; set; }
        public virtual DbSet<ly_role> ly_role { get; set; }
        public virtual DbSet<ly_route_step> ly_route_step { get; set; }
        public virtual DbSet<ly_sfc_assembly> ly_sfc_assembly { get; set; }
        public virtual DbSet<ly_sfc_nc> ly_sfc_nc { get; set; }
        public virtual DbSet<ly_sfc_step> ly_sfc_step { get; set; }
        public virtual DbSet<ly_shoporder> ly_shoporder { get; set; }
        public virtual DbSet<ly_shoporder_sfc> ly_shoporder_sfc { get; set; }
        public virtual DbSet<ly_site> ly_site { get; set; }
        public virtual DbSet<ly_user> ly_user { get; set; }
        public virtual DbSet<ly_user_role> ly_user_role { get; set; }
        public virtual DbSet<ly_userlogin> ly_userlogin { get; set; }
        public virtual DbSet<ly_workcenter> ly_workcenter { get; set; }
        public virtual DbSet<ly_workcenter_relation> ly_workcenter_relation { get; set; }
        public virtual DbSet<ly_workshop_inventory> ly_workshop_inventory { get; set; }
        public virtual DbSet<mbb_bd_mrl> mbb_bd_mrl { get; set; }
        public virtual DbSet<mbb_code_his> mbb_code_his { get; set; }
        public virtual DbSet<mbb_code_rule> mbb_code_rule { get; set; }
        public virtual DbSet<mbb_code_rule_detail> mbb_code_rule_detail { get; set; }
        public virtual DbSet<mbb_measure> mbb_measure { get; set; }
        public virtual DbSet<mbb_mrl_barcode> mbb_mrl_barcode { get; set; }
        public virtual DbSet<mbb_mrl_class> mbb_mrl_class { get; set; }
        public virtual DbSet<mbb_mrl_group> mbb_mrl_group { get; set; }
        public virtual DbSet<mbb_mrl_group_class> mbb_mrl_group_class { get; set; }
        public virtual DbSet<mbb_produ_bom> mbb_produ_bom { get; set; }
        public virtual DbSet<mbb_rule_set> mbb_rule_set { get; set; }
        public virtual DbSet<mbb_udi> mbb_udi { get; set; }
        public virtual DbSet<mbb_udi_type> mbb_udi_type { get; set; }
        public virtual DbSet<mbf_calendar> mbf_calendar { get; set; }
        public virtual DbSet<mbf_calendar_detail> mbf_calendar_detail { get; set; }
        public virtual DbSet<mbf_calendar_detail_work_shift> mbf_calendar_detail_work_shift { get; set; }
        public virtual DbSet<mbf_def_eresource> mbf_def_eresource { get; set; }
        public virtual DbSet<mbf_def_mresource> mbf_def_mresource { get; set; }
        public virtual DbSet<mbf_def_operation> mbf_def_operation { get; set; }
        public virtual DbSet<mbf_def_presource> mbf_def_presource { get; set; }
        public virtual DbSet<mbf_doc> mbf_doc { get; set; }
        public virtual DbSet<mbf_doc_type> mbf_doc_type { get; set; }
        public virtual DbSet<mbf_equipment> mbf_equipment { get; set; }
        public virtual DbSet<mbf_equipment_class> mbf_equipment_class { get; set; }
        public virtual DbSet<mbf_equipment_employee> mbf_equipment_employee { get; set; }
        public virtual DbSet<mbf_equipment_workcell> mbf_equipment_workcell { get; set; }
        public virtual DbSet<mbf_holiday> mbf_holiday { get; set; }
        public virtual DbSet<mbf_holiday_detail> mbf_holiday_detail { get; set; }
        public virtual DbSet<mbf_labour_group> mbf_labour_group { get; set; }
        public virtual DbSet<mbf_labour_group_detail> mbf_labour_group_detail { get; set; }
        public virtual DbSet<mbf_op_eresource> mbf_op_eresource { get; set; }
        public virtual DbSet<mbf_op_mresource> mbf_op_mresource { get; set; }
        public virtual DbSet<mbf_op_presource> mbf_op_presource { get; set; }
        public virtual DbSet<mbf_route_line> mbf_route_line { get; set; }
        public virtual DbSet<mbf_route_operation> mbf_route_operation { get; set; }
        public virtual DbSet<mbf_route_product> mbf_route_product { get; set; }
        public virtual DbSet<mbf_work_shift> mbf_work_shift { get; set; }
        public virtual DbSet<mbf_work_shift_class> mbf_work_shift_class { get; set; }
        public virtual DbSet<mbr_msg_record> mbr_msg_record { get; set; }
        public virtual DbSet<mbr_msg_state> mbr_msg_state { get; set; }
        public virtual DbSet<mbr_msg_type> mbr_msg_type { get; set; }
        public virtual DbSet<mbr_rule_trigger> mbr_rule_trigger { get; set; }
        public virtual DbSet<mtb_job> mtb_job { get; set; }
        public virtual DbSet<mts_group> mts_group { get; set; }
        public virtual DbSet<mts_msg_history> mts_msg_history { get; set; }
        public virtual DbSet<mts_msg_receive> mts_msg_receive { get; set; }
        public virtual DbSet<mts_user_menu> mts_user_menu { get; set; }
        public virtual DbSet<pmbb_company> pmbb_company { get; set; }
        public virtual DbSet<pmbb_customer> pmbb_customer { get; set; }
        public virtual DbSet<pmbb_customer_class> pmbb_customer_class { get; set; }
        public virtual DbSet<pmbb_dept> pmbb_dept { get; set; }
        public virtual DbSet<pmbb_employee> pmbb_employee { get; set; }
        public virtual DbSet<pmbb_employee_class> pmbb_employee_class { get; set; }
        public virtual DbSet<pmbb_supplier> pmbb_supplier { get; set; }
        public virtual DbSet<pmbb_supplier_class> pmbb_supplier_class { get; set; }
        public virtual DbSet<pmbf_location> pmbf_location { get; set; }
        public virtual DbSet<pmbf_location_class> pmbf_location_class { get; set; }
        public virtual DbSet<pmbf_site> pmbf_site { get; set; }
        public virtual DbSet<pmbf_site_class> pmbf_site_class { get; set; }
        public virtual DbSet<pmbf_work_cell> pmbf_work_cell { get; set; }
        public virtual DbSet<pmbf_work_cell_class> pmbf_work_cell_class { get; set; }
        public virtual DbSet<pmbf_work_center> pmbf_work_center { get; set; }
        public virtual DbSet<pmbf_work_center_class> pmbf_work_center_class { get; set; }
        public virtual DbSet<pmbf_work_center_group> pmbf_work_center_group { get; set; }
        public virtual DbSet<qrtz_blob_triggers> qrtz_blob_triggers { get; set; }
        public virtual DbSet<qrtz_calendars> qrtz_calendars { get; set; }
        public virtual DbSet<qrtz_cron_triggers> qrtz_cron_triggers { get; set; }
        public virtual DbSet<qrtz_fired_triggers> qrtz_fired_triggers { get; set; }
        public virtual DbSet<qrtz_job_details> qrtz_job_details { get; set; }
        public virtual DbSet<qrtz_locks> qrtz_locks { get; set; }
        public virtual DbSet<qrtz_paused_trigger_grps> qrtz_paused_trigger_grps { get; set; }
        public virtual DbSet<qrtz_scheduler_state> qrtz_scheduler_state { get; set; }
        public virtual DbSet<qrtz_simple_triggers> qrtz_simple_triggers { get; set; }
        public virtual DbSet<qrtz_simprop_triggers> qrtz_simprop_triggers { get; set; }
        public virtual DbSet<qrtz_triggers> qrtz_triggers { get; set; }
        public virtual DbSet<uemp_chk_class> uemp_chk_class { get; set; }
        public virtual DbSet<uemp_chk_item> uemp_chk_item { get; set; }
        public virtual DbSet<uemp_chk_list> uemp_chk_list { get; set; }
        public virtual DbSet<uemp_chk_part> uemp_chk_part { get; set; }
        public virtual DbSet<uemp_chk_rel> uemp_chk_rel { get; set; }
        public virtual DbSet<uemp_equip_calendar> uemp_equip_calendar { get; set; }
        public virtual DbSet<uemp_equip_plan> uemp_equip_plan { get; set; }
        public virtual DbSet<uemp_equip_task> uemp_equip_task { get; set; }
        public virtual DbSet<uemp_equip_task_item> uemp_equip_task_item { get; set; }
        public virtual DbSet<uemp_equip_task_part> uemp_equip_task_part { get; set; }
        public virtual DbSet<uemp_mnt_plan> uemp_mnt_plan { get; set; }
        public virtual DbSet<uemp_mnt_type> uemp_mnt_type { get; set; }
        public virtual DbSet<uex_barcode_detail> uex_barcode_detail { get; set; }
        public virtual DbSet<uex_barcode_rule> uex_barcode_rule { get; set; }
        public virtual DbSet<uex_daq_info> uex_daq_info { get; set; }
        public virtual DbSet<uex_discard_detail> uex_discard_detail { get; set; }
        public virtual DbSet<uex_discard_rework> uex_discard_rework { get; set; }
        public virtual DbSet<uex_furnace_area> uex_furnace_area { get; set; }
        public virtual DbSet<uex_furnace_handle_record> uex_furnace_handle_record { get; set; }
        public virtual DbSet<uex_kpart> uex_kpart { get; set; }
        public virtual DbSet<uex_kpart_detail> uex_kpart_detail { get; set; }
        public virtual DbSet<uex_making_order> uex_making_order { get; set; }
        public virtual DbSet<uex_staff_work> uex_staff_work { get; set; }
        public virtual DbSet<uex_vtrack_record> uex_vtrack_record { get; set; }
        public virtual DbSet<umpp_plan_order> umpp_plan_order { get; set; }
        public virtual DbSet<umpp_rule> umpp_rule { get; set; }
        public virtual DbSet<umpp_rule_param> umpp_rule_param { get; set; }
        public virtual DbSet<umpp_task_order> umpp_task_order { get; set; }
        public virtual DbSet<umpp_work_order> umpp_work_order { get; set; }
        public virtual DbSet<uqc_bd_discard> uqc_bd_discard { get; set; }
        public virtual DbSet<uqc_chk_bill> uqc_chk_bill { get; set; }
        public virtual DbSet<uqc_chk_bill_item> uqc_chk_bill_item { get; set; }
        public virtual DbSet<uqc_chk_bill_item_svalue> uqc_chk_bill_item_svalue { get; set; }
        public virtual DbSet<uqc_chk_item_type> uqc_chk_item_type { get; set; }
        public virtual DbSet<uqc_chk_temp> uqc_chk_temp { get; set; }
        public virtual DbSet<uqc_chk_temp_detail> uqc_chk_temp_detail { get; set; }
        public virtual DbSet<uqc_chk_type> uqc_chk_type { get; set; }
        public virtual DbSet<uqc_op_discard> uqc_op_discard { get; set; }
        public virtual DbSet<uqcm_chk_item> uqcm_chk_item { get; set; }
        public virtual DbSet<uqcm_chk_item_detail> uqcm_chk_item_detail { get; set; }
        public virtual DbSet<urm_chk_item> urm_chk_item { get; set; }
        public virtual DbSet<urm_chk_list> urm_chk_list { get; set; }
        public virtual DbSet<urm_chk_rel> urm_chk_rel { get; set; }
        public virtual DbSet<urm_mnt_plan> urm_mnt_plan { get; set; }
        public virtual DbSet<urm_mnt_task> urm_mnt_task { get; set; }
        public virtual DbSet<urm_mnt_task_item> urm_mnt_task_item { get; set; }
        public virtual DbSet<urm_mnt_type> urm_mnt_type { get; set; }
        public virtual DbSet<urm_rs_base> urm_rs_base { get; set; }
        public virtual DbSet<urm_rs_base_calendar> urm_rs_base_calendar { get; set; }
        public virtual DbSet<urm_rs_bom> urm_rs_bom { get; set; }
        public virtual DbSet<urm_rs_class> urm_rs_class { get; set; }
        public virtual DbSet<urm_rs_plan> urm_rs_plan { get; set; }
        public virtual DbSet<usm_exception_bill> usm_exception_bill { get; set; }
        public virtual DbSet<usm_exception_content> usm_exception_content { get; set; }
        public virtual DbSet<usm_exception_measure> usm_exception_measure { get; set; }
        public virtual DbSet<usm_exception_reason> usm_exception_reason { get; set; }
        public virtual DbSet<usm_exception_type> usm_exception_type { get; set; }
        public virtual DbSet<interface_record> interface_record { get; set; }
        public virtual DbSet<mbf_op_doc> mbf_op_doc { get; set; }
        public virtual DbSet<mts_user_group> mts_user_group { get; set; }
        public virtual DbSet<nianhuan_task> nianhuan_task { get; set; }
        public virtual DbSet<report_management> report_management { get; set; }
        public virtual DbSet<sync_operation> sync_operation { get; set; }
        public virtual DbSet<uex_furnace_photo> uex_furnace_photo { get; set; }
        public virtual DbSet<uex_produ_out> uex_produ_out { get; set; }
        public virtual DbSet<umpp_work_order_reform> umpp_work_order_reform { get; set; }
        public virtual DbSet<umpp_work_order_reform_op> umpp_work_order_reform_op { get; set; }
        public virtual DbSet<urm_chk_class> urm_chk_class { get; set; }
        public virtual DbSet<user_color> user_color { get; set; }
        public virtual DbSet<jrl_view> jrl_view { get; set; }
        public virtual DbSet<op_view> op_view { get; set; }
        public virtual DbSet<task_view> task_view { get; set; }
        public virtual DbSet<v_PartSHWorkCurProce> v_PartSHWorkCurProce { get; set; }
        public virtual DbSet<v_ShWkMatIngotNo> v_ShWkMatIngotNo { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<ly_process_route>()
                .Property(e => e.state)
                .HasPrecision(1, 0);

            modelBuilder.Entity<ly_process_route>()
                .Property(e => e.allowpass)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbb_bd_mrl>()
                .Property(e => e.MARK_TIME)
                .HasPrecision(6);

            modelBuilder.Entity<mbf_route_line>()
                .Property(e => e.MARK_TIME)
                .HasPrecision(3);

            modelBuilder.Entity<mbf_route_operation>()
                .Property(e => e.MARK_TIME)
                .HasPrecision(3);

            modelBuilder.Entity<mbf_route_product>()
                .Property(e => e.MARK_TIME)
                .HasPrecision(3);

            modelBuilder.Entity<mbr_msg_record>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbr_msg_record>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbr_msg_state>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbr_msg_state>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbr_msg_type>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbr_msg_type>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbr_rule_trigger>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mbr_rule_trigger>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mts_msg_history>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mts_msg_history>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mts_msg_receive>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<mts_msg_receive>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<qrtz_job_details>()
                .HasMany(e => e.qrtz_triggers)
                .WithRequired(e => e.qrtz_job_details)
                .HasForeignKey(e => new { e.SCHED_NAME, e.JOB_NAME, e.JOB_GROUP })
                .WillCascadeOnDelete(false);

            modelBuilder.Entity<qrtz_simprop_triggers>()
                .Property(e => e.DEC_PROP_1)
                .HasPrecision(13, 4);

            modelBuilder.Entity<qrtz_simprop_triggers>()
                .Property(e => e.DEC_PROP_2)
                .HasPrecision(13, 4);

            modelBuilder.Entity<qrtz_triggers>()
                .Property(e => e.JOB_DATA)
                .IsUnicode(false);

            modelBuilder.Entity<qrtz_triggers>()
                .HasOptional(e => e.qrtz_blob_triggers)
                .WithRequired(e => e.qrtz_triggers);

            modelBuilder.Entity<qrtz_triggers>()
                .HasOptional(e => e.qrtz_simple_triggers)
                .WithRequired(e => e.qrtz_triggers);

            modelBuilder.Entity<qrtz_triggers>()
                .HasOptional(e => e.qrtz_simprop_triggers)
                .WithRequired(e => e.qrtz_triggers);

            modelBuilder.Entity<uemp_chk_item>()
                .Property(e => e.CHK_MODE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_chk_item>()
                .Property(e => e.STANDARD_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<uemp_chk_item>()
                .Property(e => e.MAX_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<uemp_chk_item>()
                .Property(e => e.MIN_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<uemp_chk_item>()
                .Property(e => e.IS_DEFAULT_ENABLE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_chk_item>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_chk_item>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_chk_part>()
                .Property(e => e.QTY)
                .HasPrecision(18, 3);

            modelBuilder.Entity<uemp_chk_part>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_chk_part>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_chk_rel>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_chk_rel>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_calendar>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_calendar>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_plan>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_plan>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_task>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_task>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_task_item>()
                .Property(e => e.CHK_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<uemp_equip_task_item>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_task_item>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_task_part>()
                .Property(e => e.QTY)
                .HasPrecision(18, 3);

            modelBuilder.Entity<uemp_equip_task_part>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_equip_task_part>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_mnt_plan>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_mnt_plan>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_mnt_type>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uemp_mnt_type>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uex_daq_info>()
                .Property(e => e.MARK_TIME)
                .IsFixedLength();

            modelBuilder.Entity<uex_furnace_handle_record>()
                .Property(e => e.LAST_RECORD_GID)
                .IsUnicode(false);

            modelBuilder.Entity<umpp_plan_order>()
                .Property(e => e.RECEIVE_QTY)
                .HasPrecision(9, 2);

            modelBuilder.Entity<umpp_plan_order>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_plan_order>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_rule>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_rule>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_rule_param>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_rule_param>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_task_order>()
                .Property(e => e.MARK_TIME)
                .IsFixedLength();

            modelBuilder.Entity<umpp_task_order>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_task_order>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_work_order>()
                .Property(e => e.RECEIVE_QTY)
                .HasPrecision(9, 2);

            modelBuilder.Entity<umpp_work_order>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_work_order>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uqc_chk_temp_detail>()
                .Property(e => e.NAME)
                .IsUnicode(false);

            modelBuilder.Entity<uqc_chk_temp_detail>()
                .Property(e => e.CODE)
                .IsUnicode(false);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.STANDARD_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.MAX_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.MIN_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.UP_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.NAME_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.DOWN_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.ERROR_RATE)
                .HasPrecision(18, 5);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.ABSOLUTE_SET)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.RANGE_SET)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_chk_item>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_chk_list>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_chk_list>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_chk_rel>()
                .Property(e => e.STANDARD_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_rel>()
                .Property(e => e.MAX_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_rel>()
                .Property(e => e.MIN_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_chk_rel>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_chk_rel>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_plan>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_plan>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_task>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_task>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_task_item>()
                .Property(e => e.CHK_VALUE)
                .HasPrecision(18, 3);

            modelBuilder.Entity<urm_mnt_task_item>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_task_item>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_type>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_type>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_mnt_type>()
                .Property(e => e.COLOR)
                .IsUnicode(false);

            modelBuilder.Entity<urm_rs_base>()
                .Property(e => e.RATIO)
                .HasPrecision(15, 3);

            modelBuilder.Entity<urm_rs_base>()
                .Property(e => e.PRICE)
                .HasPrecision(16, 2);

            modelBuilder.Entity<urm_rs_base>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_base>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_base_calendar>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_base_calendar>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_bom>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_bom>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_bom>()
                .Property(e => e.CODE)
                .IsUnicode(false);

            modelBuilder.Entity<urm_rs_class>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_class>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_plan>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_rs_plan>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.ACTION_ID)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.HANDLE_ID)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.CLOSE_ID)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.EXCEPTION_MEASURE_GID)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.EXCEPTION_MEASURE_CODE)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.EXCEPTION_MEASURE_NAME)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.EXCEPTION_REASON_GID)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.EXCEPTION_REASON_CODE)
                .IsUnicode(false);

            modelBuilder.Entity<usm_exception_bill>()
                .Property(e => e.EXCEPTION_REASON_NAME)
                .IsUnicode(false);

            modelBuilder.Entity<nianhuan_task>()
                .Property(e => e.OUTSIZE)
                .HasPrecision(20, 5);

            modelBuilder.Entity<nianhuan_task>()
                .Property(e => e.INSIZE)
                .HasPrecision(20, 5);

            modelBuilder.Entity<nianhuan_task>()
                .Property(e => e.HSIZE)
                .HasPrecision(20, 5);

            modelBuilder.Entity<report_management>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<report_management>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uex_produ_out>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<uex_produ_out>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_work_order_reform>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_work_order_reform>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_work_order_reform_op>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_work_order_reform_op>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<umpp_work_order_reform_op>()
                .Property(e => e.DEF_OP_NAME)
                .IsUnicode(false);

            modelBuilder.Entity<urm_chk_class>()
                .Property(e => e.IS_ACTIVE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<urm_chk_class>()
                .Property(e => e.IS_DELETE)
                .HasPrecision(1, 0);

            modelBuilder.Entity<op_view>()
                .Property(e => e.MARK_TIME)
                .HasPrecision(3);

            modelBuilder.Entity<v_PartSHWorkCurProce>()
                .Property(e => e.FEntrySelfS0173)
                .IsUnicode(false);

            modelBuilder.Entity<v_PartSHWorkCurProce>()
                .Property(e => e.FForgingWeight)
                .HasPrecision(23, 10);

            modelBuilder.Entity<v_PartSHWorkCurProce>()
                .Property(e => e.FDataFrom)
                .IsUnicode(false);

            modelBuilder.Entity<v_ShWkMatIngotNo>()
                .Property(e => e.FEntrySelfS0173)
                .IsUnicode(false);

            modelBuilder.Entity<v_ShWkMatIngotNo>()
                .Property(e => e.FForgingWeight)
                .HasPrecision(23, 10);

            modelBuilder.Entity<v_ShWkMatIngotNo>()
                .Property(e => e.FDataFrom)
                .IsUnicode(false);

            modelBuilder.Entity<v_ShWkMatIngotNo>()
                .Property(e => e.FOrderQty)
                .HasPrecision(28, 10);

            modelBuilder.Entity<v_ShWkMatIngotNo>()
                .Property(e => e.FDdWg)
                .HasPrecision(23, 8);
        }
    }
}
